<style type="text/css">
.floatonline_1{ padding:1px; width:130px; text-align:left;}
.scroll_title_2{height:25px; line-height:25px; background:url(<?php echo $this->imgpath;?>/online4_1.gif) no-repeat 0px 0px; position:relative;}
.scroll_title_2 span{ padding-left:15px; font-weight:bold;font-size:12px; color:#FFFFFF;}
.scroll_title_2 a{ display:block; position:absolute; right:8px; top:6px; line-height:15px;  width:11px; height:11px; background:url(<?php echo $this->imgpath;?>/close2_1.gif) no-repeat 0px 0px;}
.scroll_main2{ padding:4px; background:#c5e2f8; border:1px solid #498bcf;}
.scroll_text2{ background:#FFFFFF; border:1px solid #a7d8d7; padding:3px;}
.scroll_qq_1{padding:5px 2px 5px 2px; text-align:left; font-weight:bold;font-size:12px; color:#333333; }
.scroll_qq_1 img{padding:5px 0px 0px 0px;}
.scroll_skype_1{ padding:5px;}
.scroll_alibaba_1{ padding:5px;}
.scroll_foot_2{ background:#FFFFFF; border:1px solid #a7d8d7; text-align:center; padding:3px; line-height:18px; margin-top:5px;}}
</style>
<script type="text/JavaScript" language="JavaScript">
var Floaters = {

 delta: 0.08,

 queue: null,

 collection: {},

 items: {},

 addItem: function(Obj,left,top,ani)
 {
 Obj.style['top'] = top + 'px';
 Obj.style['left'] = left + 'px';
 var newItem = { object:Obj, oLeft:left, oTop:top };
 this.items[this.items.length] = newItem;

 this.delta = ani ? ani : this.delta;
 },

 sPlay: function()
 {
 this.collection = this.items;
 this.queue = setInterval('play()',10);
 }
}


function checkStandard()
{
 var scrollY;
 if (document.documentElement && document.documentElement.scrollTop)
 {
 scrollY = document.documentElement.scrollTop;
 }
 else if (document.body)
 {
 scrollY = document.body.scrollTop;
 }
 return scrollY;
}



function play()
{
 var diffY = checkStandard();
 for(var i in Floaters.collection)
 {
 var obj = Floaters.collection[i].object;
 var obj_y = Floaters.collection[i].oTop;
 var total = diffY + obj_y;
 if( obj.offsetTop != total)
 {
 var oy = (total - obj.offsetTop) * Floaters.delta;
 oy = ( oy>0?1:-1 ) * Math.ceil( Math.abs(oy) );
 obj.style['top'] = obj.offsetTop + oy + 'px';
 }else
 {
 clearInterval(Floaters.queue);
 Floaters.queue = setInterval('play()',10);
 }
 }
}
</script>
<div class="floatonline_1" style="position: absolute; top: 577px; left: 871px;" id="floatDivr">
<div class="scroll_title_2"><span><?php echo C_Text::_('Online');?></span><a onmousedown="Mouseclose()" title="<?php echo C_Text::_('Close');?>" href="#"> </a></div>
<div class="scroll_main2">
<div class="scroll_text2">
<?php
$tmponline = $this->onlinelist;
$link = array(
			'qq'=>		array('href'=>'href="tencent://message/?uin=%s &amp;Menu=yes"','src'=>'src="http://wpa.qq.com/pa?p=1:%s:4"'),
			'msn'=> 	array('href'=>'href="msnim:chat?contact=%s"','src'=>'src="'.$this->imgpath.'/msn1.gif"'),
			'taobao'=>	array('href'=>'href="http://amos.im.alisoft.com/msg.aw?v=1&amp;uid=%s&amp;site=cntaobao&amp;s=2&amp;charset=utf-8" target="_blank"','src'=>'src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=%s&amp;site=cntaobao&amp;s=2&amp;charset=utf-8"'),
			'alibaba'=> array('href'=>'href="http://amos1.sh1.china.alibaba.com/msg.atc?v=1&amp;uid=%s" target="_blank"','src'=>'src="http://amos1.sh1.china.alibaba.com/online.atc?v=1&amp;uid=%s&amp;s=101"'),
			'skype'=>	array('href'=>'href="callto://%s"','src'=>'src="'.$this->imgpath.'/skype13.gif"')
			);
for($i=0;$i<count($tmponline);$i++)
{
	$tmp = $tmponline[$i];
?>
	<div class="scroll_qq_1"><?php echo $tmp['fieldvalue'];?>	
	<span style="display:block;">
	<?php
		foreach($link AS $key=>$value)
		{
			if(!empty($tmp[$key])){
				echo '<a style="text-decoration: none;" ' . printf($value['href'],$tmp[$key]) . '<img border="0" ' . printf($value['src'],$tmp[$key]) . ' /></a>';
			}
		}
	?>	
	</span>
	</div>
<?php
}
?>
</div>
</div>
</div>
<script type="text/JavaScript" language="JavaScript">
 function Mouseclose(){document.getElementById('floatDivr').style.display='none';}
window.onload = function(){
var floatObjr = document.getElementById('floatDivr');
Floaters.addItem(floatObjr,screen.width-153,118);
Floaters.sPlay();
}
</script>

